<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP               #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts  #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes        #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE OverloadedStrings #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Module      :  Distribution.Simple.Program.HcPkg</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Copyright   :  Duncan Coutts 2009, 2013</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- This module provides an library interface to the @hc-pkg@ program.</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Currently only GHC and GHCJS have hc-pkg programs.</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.Program.HcPkg</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Types</span></span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier">HcPkgInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier">RegisterOptions</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#defaultRegisterOptions"><span class="hs-identifier">defaultRegisterOptions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Actions</span></span><span>
</span><span id="line-24"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#init"><span class="hs-identifier">init</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#invoke"><span class="hs-identifier">invoke</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#register"><span class="hs-identifier">register</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#unregister"><span class="hs-identifier">unregister</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#recache"><span class="hs-identifier">recache</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#expose"><span class="hs-identifier">expose</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#hide"><span class="hs-identifier">hide</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#dump"><span class="hs-identifier">dump</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#describe"><span class="hs-identifier">describe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#list"><span class="hs-identifier">list</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Program invocations</span></span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#initInvocation"><span class="hs-identifier">initInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#registerInvocation"><span class="hs-identifier">registerInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#unregisterInvocation"><span class="hs-identifier">unregisterInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#recacheInvocation"><span class="hs-identifier">recacheInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#exposeInvocation"><span class="hs-identifier">exposeInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#hideInvocation"><span class="hs-identifier">hideInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#dumpInvocation"><span class="hs-identifier">dumpInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#describeInvocation"><span class="hs-identifier">describeInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#listInvocation"><span class="hs-identifier">listInvocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#init"><span class="hs-identifier">init</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html"><span class="hs-identifier">Distribution.Simple.Program.Run</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html"><span class="hs-identifier">Distribution.Simple.Program.Types</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html"><span class="hs-identifier">Distribution.Types.ComponentId</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html"><span class="hs-identifier">Distribution.Types.PackageId</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html"><span class="hs-identifier">Distribution.Types.UnitId</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.OldList.html#stripPrefix"><span class="hs-identifier">stripPrefix</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">FilePath</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#isPathSeparator"><span class="hs-identifier">isPathSeparator</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#joinPath"><span class="hs-identifier">joinPath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#splitDirectories"><span class="hs-identifier">splitDirectories</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#splitPath"><span class="hs-identifier">splitPath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator">(&lt;.&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span>       </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS</span></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.html#"><span class="hs-identifier">Data.ByteString.Lazy</span></a></span><span>  </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LBS</span></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span>    </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">NE</span></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Posix.html#"><span class="hs-identifier">System.FilePath.Posix</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">FilePath.Posix</span></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | Information about the features and capabilities of an @hc-pkg@</span><span>
</span><span id="line-71"></span><span class="hs-comment">--   program.</span><span>
</span><span id="line-72"></span><span class="hs-comment">--</span><span>
</span><span id="line-73"></span><span class="hs-keyword">data</span><span> </span><span id="HcPkgInfo"><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-var">HcPkgInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="HcPkgInfo"><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-var">HcPkgInfo</span></a></span></span><span>
</span><span id="line-74"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="hcPkgProgram"><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span>
</span><span id="line-75"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="noPkgDbStack"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#noPkgDbStack"><span class="hs-identifier hs-var hs-var">noPkgDbStack</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ no package DB stack supported</span><span>
</span><span id="line-76"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="noVerboseFlag"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#noVerboseFlag"><span class="hs-identifier hs-var hs-var">noVerboseFlag</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ hc-pkg does not support verbosity flags</span><span>
</span><span id="line-77"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="flagPackageConf"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#flagPackageConf"><span class="hs-identifier hs-var hs-var">flagPackageConf</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ use package-conf option instead of package-db</span><span>
</span><span id="line-78"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="supportsDirDbs"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#supportsDirDbs"><span class="hs-identifier hs-var hs-var">supportsDirDbs</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ supports directory style package databases</span><span>
</span><span id="line-79"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="requiresDirDbs"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#requiresDirDbs"><span class="hs-identifier hs-var hs-var">requiresDirDbs</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ requires directory style package databases</span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="nativeMultiInstance"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#nativeMultiInstance"><span class="hs-identifier hs-var hs-var">nativeMultiInstance</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ supports --enable-multi-instance flag</span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="recacheMultiInstance"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#recacheMultiInstance"><span class="hs-identifier hs-var hs-var">recacheMultiInstance</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ supports multi-instance via recache</span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="suppressFilesCheck"><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#suppressFilesCheck"><span class="hs-identifier hs-var hs-var">suppressFilesCheck</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ supports --force-files or equivalent</span><span>
</span><span id="line-83"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-comment">-- | Call @hc-pkg@ to initialise a package database at the location {path}.</span><span>
</span><span id="line-87"></span><span class="hs-comment">--</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- &gt; hc-pkg init {path}</span><span>
</span><span id="line-89"></span><span class="hs-comment">--</span><span>
</span><span id="line-90"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#init"><span class="hs-identifier hs-type">init</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span id="init"><span class="annot"><span class="annottext">init :: HcPkgInfo -&gt; Verbosity -&gt; Bool -&gt; [Char] -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#init"><span class="hs-identifier hs-var hs-var">init</span></a></span></span><span> </span><span id="local-6989586621679706949"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706949"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706948"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706948"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706947"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679706947"><span class="hs-identifier hs-var">preferCompat</span></a></span></span><span> </span><span id="local-6989586621679706946"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706946"><span class="hs-identifier hs-var">path</span></a></span></span><span>
</span><span id="line-92"></span><span>  </span><span class="hs-glyph">|</span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#supportsDirDbs"><span class="hs-identifier hs-var hs-var">supportsDirDbs</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706949"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#requiresDirDbs"><span class="hs-identifier hs-var hs-var">requiresDirDbs</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706949"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679706947"><span class="hs-identifier hs-var">preferCompat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; IO ()
</span><a href="../../base/src/System.IO.html#writeFile"><span class="hs-identifier hs-var">writeFile</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706946"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;[]&quot;</span></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706948"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [Char] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#initInvocation"><span class="hs-identifier hs-var">initInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706949"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706948"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706946"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-comment">-- | Run @hc-pkg@ using a given package DB stack, directly forwarding the</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- provided command-line arguments to it.</span><span>
</span><span id="line-101"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#invoke"><span class="hs-identifier hs-type">invoke</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span id="invoke"><span class="annot"><span class="annottext">invoke :: HcPkgInfo -&gt; Verbosity -&gt; PackageDBStack -&gt; [[Char]] -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#invoke"><span class="hs-identifier hs-var hs-var">invoke</span></a></span></span><span> </span><span id="local-6989586621679706940"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706940"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706939"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706939"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706938"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706938"><span class="hs-identifier hs-var">dbStack</span></a></span></span><span> </span><span id="local-6989586621679706937"><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706937"><span class="hs-identifier hs-var">extraArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-103"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706939"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramInvocation
</span><a href="#local-6989586621679706936"><span class="hs-identifier hs-var">invocation</span></a></span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-105"></span><span>    </span><span id="local-6989586621679706935"><span class="annot"><span class="annottext">args :: [[Char]]
</span><a href="#local-6989586621679706935"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDBStack -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbStackOpts"><span class="hs-identifier hs-var">packageDbStackOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706940"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706938"><span class="hs-identifier hs-var">dbStack</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706937"><span class="hs-identifier hs-var">extraArgs</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span id="local-6989586621679706936"><span class="annot"><span class="annottext">invocation :: ProgramInvocation
</span><a href="#local-6989586621679706936"><span class="hs-identifier hs-var hs-var">invocation</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706940"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706935"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | Additional variations in the behaviour for 'register'.</span><span>
</span><span id="line-109"></span><span class="hs-keyword">data</span><span> </span><span id="RegisterOptions"><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-var">RegisterOptions</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="RegisterOptions"><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-var">RegisterOptions</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-110"></span><span>       </span><span class="hs-comment">-- | Allows re-registering \/ overwriting an existing package</span><span>
</span><span id="line-111"></span><span>       </span><span id="registerAllowOverwrite"><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerAllowOverwrite"><span class="hs-identifier hs-var hs-var">registerAllowOverwrite</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span>       </span><span class="hs-comment">-- | Insist on the ability to register multiple instances of a</span><span>
</span><span id="line-114"></span><span>       </span><span class="hs-comment">-- single version of a single package. This will fail if the @hc-pkg@</span><span>
</span><span id="line-115"></span><span>       </span><span class="hs-comment">-- does not support it, see 'nativeMultiInstance' and</span><span>
</span><span id="line-116"></span><span>       </span><span class="hs-comment">-- 'recacheMultiInstance'.</span><span>
</span><span id="line-117"></span><span>       </span><span id="registerMultiInstance"><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var hs-var">registerMultiInstance</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span>       </span><span class="hs-comment">-- | Require that no checks are performed on the existence of package</span><span>
</span><span id="line-120"></span><span>       </span><span class="hs-comment">-- files mentioned in the registration info. This must be used if</span><span>
</span><span id="line-121"></span><span>       </span><span class="hs-comment">-- registering prior to putting the files in their final place. This will</span><span>
</span><span id="line-122"></span><span>       </span><span class="hs-comment">-- fail if the @hc-pkg@ does not support it, see 'suppressFilesCheck'.</span><span>
</span><span id="line-123"></span><span>       </span><span id="registerSuppressFilesCheck"><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerSuppressFilesCheck"><span class="hs-identifier hs-var hs-var">registerSuppressFilesCheck</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-124"></span><span>     </span><span class="hs-special">}</span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-comment">-- | Defaults are @True@, @False@ and @False@</span><span>
</span><span id="line-127"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#defaultRegisterOptions"><span class="hs-identifier hs-type">defaultRegisterOptions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-type">RegisterOptions</span></a></span><span>
</span><span id="line-128"></span><span id="defaultRegisterOptions"><span class="annot"><span class="annottext">defaultRegisterOptions :: RegisterOptions
</span><a href="Distribution.Simple.Program.HcPkg.html#defaultRegisterOptions"><span class="hs-identifier hs-var hs-var">defaultRegisterOptions</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegisterOptions :: Bool -&gt; Bool -&gt; Bool -&gt; RegisterOptions
</span><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-type">RegisterOptions</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-129"></span><span>    </span><span class="annot"><span class="annottext">registerAllowOverwrite :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerAllowOverwrite"><span class="hs-identifier hs-var">registerAllowOverwrite</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-130"></span><span>    </span><span class="annot"><span class="annottext">registerMultiInstance :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var">registerMultiInstance</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-131"></span><span>    </span><span class="annot"><span class="annottext">registerSuppressFilesCheck :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerSuppressFilesCheck"><span class="hs-identifier hs-var">registerSuppressFilesCheck</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-132"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | Call @hc-pkg@ to register a package.</span><span>
</span><span id="line-135"></span><span class="hs-comment">--</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- &gt; hc-pkg register {filename | -} [--user | --global | --package-db]</span><span>
</span><span id="line-137"></span><span class="hs-comment">--</span><span>
</span><span id="line-138"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#register"><span class="hs-identifier hs-type">register</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-139"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-140"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-type">RegisterOptions</span></a></span><span>
</span><span id="line-141"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span id="register"><span class="annot"><span class="annottext">register :: HcPkgInfo
-&gt; Verbosity
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#register"><span class="hs-identifier hs-var hs-var">register</span></a></span></span><span> </span><span id="local-6989586621679706928"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706927"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706926"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706926"><span class="hs-identifier hs-var">packagedbs</span></a></span></span><span> </span><span id="local-6989586621679706925"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706925"><span class="hs-identifier hs-var">pkgInfo</span></a></span></span><span> </span><span id="local-6989586621679706924"><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706924"><span class="hs-identifier hs-var">registerOptions</span></a></span></span><span>
</span><span id="line-143"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var hs-var">registerMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706924"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#nativeMultiInstance"><span class="hs-identifier hs-var hs-var">nativeMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#recacheMultiInstance"><span class="hs-identifier hs-var hs-var">recacheMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO ()
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO ()) -&gt; [Char] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;HcPkg.register: the compiler does not support &quot;</span></span><span>
</span><span id="line-146"></span><span>       </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;registering multiple instances of packages.&quot;</span></span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerSuppressFilesCheck"><span class="hs-identifier hs-var hs-var">registerSuppressFilesCheck</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706924"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-149"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#suppressFilesCheck"><span class="hs-identifier hs-var hs-var">suppressFilesCheck</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO ()
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO ()) -&gt; [Char] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;HcPkg.register: the compiler does not support &quot;</span></span><span>
</span><span id="line-151"></span><span>                  </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;suppressing checks on files.&quot;</span></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span>    </span><span class="hs-comment">-- This is a trick. Older versions of GHC do not support the</span><span>
</span><span id="line-154"></span><span>    </span><span class="hs-comment">-- --enable-multi-instance flag for ghc-pkg register but it turns out that</span><span>
</span><span id="line-155"></span><span>    </span><span class="hs-comment">-- the same ability is available by using ghc-pkg recache. The recache</span><span>
</span><span id="line-156"></span><span>    </span><span class="hs-comment">-- command is there to support distro package managers that like to work</span><span>
</span><span id="line-157"></span><span>    </span><span class="hs-comment">-- by just installing files and running update commands, rather than</span><span>
</span><span id="line-158"></span><span>    </span><span class="hs-comment">-- special add/remove commands. So the way to register by this method is</span><span>
</span><span id="line-159"></span><span>    </span><span class="hs-comment">-- to write the package registration file directly into the package db and</span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-comment">-- then call hc-pkg recache.</span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-162"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var hs-var">registerMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706924"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-163"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#recacheMultiInstance"><span class="hs-identifier hs-var hs-var">recacheMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679706922"><span class="annot"><span class="annottext">pkgdb :: PackageDB
</span><a href="#local-6989586621679706922"><span class="hs-identifier hs-var hs-var">pkgdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-var">registrationPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706926"><span class="hs-identifier hs-var">packagedbs</span></a></span><span>
</span><span id="line-165"></span><span>       </span><span class="annot"><span class="annottext">Verbosity
-&gt; HcPkgInfo -&gt; PackageDB -&gt; InstalledPackageInfo -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#writeRegistrationFileDirectly"><span class="hs-identifier hs-var">writeRegistrationFileDirectly</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706922"><span class="hs-identifier hs-var">pkgdb</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706925"><span class="hs-identifier hs-var">pkgInfo</span></a></span><span>
</span><span id="line-166"></span><span>       </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#recache"><span class="hs-identifier hs-var">recache</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706922"><span class="hs-identifier hs-var">pkgdb</span></a></span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-169"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-170"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#registerInvocation"><span class="hs-identifier hs-var">registerInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706928"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706927"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706926"><span class="hs-identifier hs-var">packagedbs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706925"><span class="hs-identifier hs-var">pkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706924"><span class="hs-identifier hs-var">registerOptions</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#writeRegistrationFileDirectly"><span class="hs-identifier hs-type">writeRegistrationFileDirectly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-173"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span>
</span><span id="line-174"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-175"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-176"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span id="writeRegistrationFileDirectly"><span class="annot"><span class="annottext">writeRegistrationFileDirectly :: Verbosity
-&gt; HcPkgInfo -&gt; PackageDB -&gt; InstalledPackageInfo -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#writeRegistrationFileDirectly"><span class="hs-identifier hs-var hs-var">writeRegistrationFileDirectly</span></a></span></span><span> </span><span id="local-6989586621679706919"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706919"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706918"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706918"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679706916"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706916"><span class="hs-identifier hs-var">dir</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679706915"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706915"><span class="hs-identifier hs-var">pkgInfo</span></a></span></span><span>
</span><span id="line-178"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#supportsDirDbs"><span class="hs-identifier hs-var hs-var">supportsDirDbs</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706918"><span class="hs-identifier hs-var">hpi</span></a></span><span>
</span><span id="line-179"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679706912"><span class="annot"><span class="annottext">pkgfile :: [Char]
</span><a href="#local-6989586621679706912"><span class="hs-identifier hs-var hs-var">pkgfile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706916"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; UnitId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedUnitId"><span class="hs-identifier hs-var hs-var">installedUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706915"><span class="hs-identifier hs-var">pkgInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;conf&quot;</span></span><span>
</span><span id="line-180"></span><span>       </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; IO ()
</span><a href="Distribution.Utils.Generic.html#writeUTF8File"><span class="hs-identifier hs-var">writeUTF8File</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706912"><span class="hs-identifier hs-var">pkgfile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [Char]
</span><a href="Distribution.InstalledPackageInfo.html#showInstalledPackageInfo"><span class="hs-identifier hs-var">showInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706915"><span class="hs-identifier hs-var">pkgInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO ()
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706919"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO ()) -&gt; [Char] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;HcPkg.writeRegistrationFileDirectly: compiler does not support dir style package dbs&quot;</span></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#writeRegistrationFileDirectly"><span class="hs-identifier hs-var">writeRegistrationFileDirectly</span></a></span><span> </span><span id="local-6989586621679706907"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706907"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-186"></span><span>    </span><span class="hs-comment">-- We don't know here what the dir for the global or user dbs are,</span><span>
</span><span id="line-187"></span><span>    </span><span class="hs-comment">-- if that's needed it'll require a bit more plumbing to support.</span><span>
</span><span id="line-188"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO ()
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706907"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO ()) -&gt; [Char] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;HcPkg.writeRegistrationFileDirectly: only supports SpecificPackageDB for now&quot;</span></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span class="hs-comment">-- | Call @hc-pkg@ to unregister a package</span><span>
</span><span id="line-192"></span><span class="hs-comment">--</span><span>
</span><span id="line-193"></span><span class="hs-comment">-- &gt; hc-pkg unregister [pkgid] [--user | --global | --package-db]</span><span>
</span><span id="line-194"></span><span class="hs-comment">--</span><span>
</span><span id="line-195"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#unregister"><span class="hs-identifier hs-type">unregister</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span id="unregister"><span class="annot"><span class="annottext">unregister :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#unregister"><span class="hs-identifier hs-var hs-var">unregister</span></a></span></span><span> </span><span id="local-6989586621679706906"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706906"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706905"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706905"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706904"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706904"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706903"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706903"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-197"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706905"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#unregisterInvocation"><span class="hs-identifier hs-var">unregisterInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706906"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706905"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706904"><span class="hs-identifier hs-var">packagedb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706903"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- | Call @hc-pkg@ to recache the registered packages.</span><span>
</span><span id="line-202"></span><span class="hs-comment">--</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- &gt; hc-pkg recache [--user | --global | --package-db]</span><span>
</span><span id="line-204"></span><span class="hs-comment">--</span><span>
</span><span id="line-205"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#recache"><span class="hs-identifier hs-type">recache</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span id="recache"><span class="annot"><span class="annottext">recache :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#recache"><span class="hs-identifier hs-var hs-var">recache</span></a></span></span><span> </span><span id="local-6989586621679706902"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706902"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706901"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706901"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706900"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706900"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-207"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706901"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-208"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#recacheInvocation"><span class="hs-identifier hs-var">recacheInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706902"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706901"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706900"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="hs-comment">-- | Call @hc-pkg@ to expose a package.</span><span>
</span><span id="line-212"></span><span class="hs-comment">--</span><span>
</span><span id="line-213"></span><span class="hs-comment">-- &gt; hc-pkg expose [pkgid] [--user | --global | --package-db]</span><span>
</span><span id="line-214"></span><span class="hs-comment">--</span><span>
</span><span id="line-215"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#expose"><span class="hs-identifier hs-type">expose</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span id="expose"><span class="annot"><span class="annottext">expose :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#expose"><span class="hs-identifier hs-var hs-var">expose</span></a></span></span><span> </span><span id="local-6989586621679706899"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706899"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706898"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706898"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706897"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706897"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706896"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706896"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-217"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706898"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-218"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#exposeInvocation"><span class="hs-identifier hs-var">exposeInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706899"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706898"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706897"><span class="hs-identifier hs-var">packagedb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706896"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-comment">-- | Call @hc-pkg@ to retrieve a specific package</span><span>
</span><span id="line-221"></span><span class="hs-comment">--</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- &gt; hc-pkg describe [pkgid] [--user | --global | --package-db]</span><span>
</span><span id="line-223"></span><span class="hs-comment">--</span><span>
</span><span id="line-224"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#describe"><span class="hs-identifier hs-type">describe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-225"></span><span id="describe"><span class="annot"><span class="annottext">describe :: HcPkgInfo
-&gt; Verbosity
-&gt; PackageDBStack
-&gt; PackageId
-&gt; IO [InstalledPackageInfo]
</span><a href="Distribution.Simple.Program.HcPkg.html#describe"><span class="hs-identifier hs-var hs-var">describe</span></a></span></span><span> </span><span id="local-6989586621679706895"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706895"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706894"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706894"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706893"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706893"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706892"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706892"><span class="hs-identifier hs-var">pid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span>  </span><span id="local-6989586621679706891"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706891"><span class="hs-identifier hs-var">output</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ByteString
</span><a href="Distribution.Simple.Program.Run.html#getProgramInvocationLBS"><span class="hs-identifier hs-var">getProgramInvocationLBS</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706894"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-228"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity -&gt; PackageDBStack -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#describeInvocation"><span class="hs-identifier hs-var">describeInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706895"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706894"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706893"><span class="hs-identifier hs-var">packagedb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706892"><span class="hs-identifier hs-var">pid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><span class="annottext">IO ByteString -&gt; (IOException -&gt; IO ByteString) -&gt; IO ByteString
forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Compat.Exception.html#catchIO"><span class="hs-operator hs-var">`catchIO`</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">IOException
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; IO ByteString
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Either [InstalledPackageInfo] [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#parsePackages"><span class="hs-identifier hs-var">parsePackages</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706891"><span class="hs-identifier hs-var">output</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-232"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679706887"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679706887"><span class="hs-identifier hs-var">ok</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; IO [InstalledPackageInfo]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679706887"><span class="hs-identifier hs-var">ok</span></a></span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><span class="annottext">Either [InstalledPackageInfo] [[Char]]
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO [InstalledPackageInfo]
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706894"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO [InstalledPackageInfo])
-&gt; [Char] -&gt; IO [InstalledPackageInfo]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;failed to parse output of '&quot;</span></span><span>
</span><span id="line-234"></span><span>                  </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [Char]
</span><a href="Distribution.Simple.Program.Types.html#programId"><span class="hs-identifier hs-var hs-var">programId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706895"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; describe &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706892"><span class="hs-identifier hs-var">pid</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;'&quot;</span></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-comment">-- | Call @hc-pkg@ to hide a package.</span><span>
</span><span id="line-237"></span><span class="hs-comment">--</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- &gt; hc-pkg hide [pkgid] [--user | --global | --package-db]</span><span>
</span><span id="line-239"></span><span class="hs-comment">--</span><span>
</span><span id="line-240"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#hide"><span class="hs-identifier hs-type">hide</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span id="hide"><span class="annot"><span class="annottext">hide :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#hide"><span class="hs-identifier hs-var hs-var">hide</span></a></span></span><span> </span><span id="local-6989586621679706885"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706885"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706884"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706884"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706883"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706883"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706882"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706882"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-242"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ()
</span><a href="Distribution.Simple.Program.Run.html#runProgramInvocation"><span class="hs-identifier hs-var">runProgramInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706884"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-243"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#hideInvocation"><span class="hs-identifier hs-var">hideInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706885"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706884"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706883"><span class="hs-identifier hs-var">packagedb</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706882"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | Call @hc-pkg@ to get all the details of all the packages in the given</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- package database.</span><span>
</span><span id="line-248"></span><span class="hs-comment">--</span><span>
</span><span id="line-249"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#dump"><span class="hs-identifier hs-type">dump</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-250"></span><span id="dump"><span class="annot"><span class="annottext">dump :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; IO [InstalledPackageInfo]
</span><a href="Distribution.Simple.Program.HcPkg.html#dump"><span class="hs-identifier hs-var hs-var">dump</span></a></span></span><span> </span><span id="local-6989586621679706881"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706881"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706880"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706880"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706879"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706879"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span>  </span><span id="local-6989586621679706878"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706878"><span class="hs-identifier hs-var">output</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO ByteString
</span><a href="Distribution.Simple.Program.Run.html#getProgramInvocationLBS"><span class="hs-identifier hs-var">getProgramInvocationLBS</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706880"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-253"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#dumpInvocation"><span class="hs-identifier hs-var">dumpInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706881"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706880"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706879"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-254"></span><span>    </span><span class="annot"><span class="annottext">IO ByteString -&gt; (IOException -&gt; IO ByteString) -&gt; IO ByteString
forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Compat.Exception.html#catchIO"><span class="hs-operator hs-var">`catchIO`</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679706877"><span class="annot"><span class="annottext">IOException
</span><a href="#local-6989586621679706877"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO ByteString
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706880"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO ByteString) -&gt; [Char] -&gt; IO ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [Char]
</span><a href="Distribution.Simple.Program.Types.html#programId"><span class="hs-identifier hs-var hs-var">programId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706881"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; dump failed: &quot;</span></span><span>
</span><span id="line-255"></span><span>                       </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">IOException -&gt; [Char]
forall e. Exception e =&gt; e -&gt; [Char]
</span><a href="../../base/src/GHC.Exception.Type.html#displayException"><span class="hs-identifier hs-var">displayException</span></a></span><span> </span><span class="annot"><span class="annottext">IOException
</span><a href="#local-6989586621679706877"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Either [InstalledPackageInfo] [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#parsePackages"><span class="hs-identifier hs-var">parsePackages</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706878"><span class="hs-identifier hs-var">output</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-258"></span><span>    </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679706875"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679706875"><span class="hs-identifier hs-var">ok</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; IO [InstalledPackageInfo]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679706875"><span class="hs-identifier hs-var">ok</span></a></span><span>
</span><span id="line-259"></span><span>    </span><span class="annot"><span class="annottext">Either [InstalledPackageInfo] [[Char]]
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO [InstalledPackageInfo]
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706880"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO [InstalledPackageInfo])
-&gt; [Char] -&gt; IO [InstalledPackageInfo]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;failed to parse output of '&quot;</span></span><span>
</span><span id="line-260"></span><span>                  </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [Char]
</span><a href="Distribution.Simple.Program.Types.html#programId"><span class="hs-identifier hs-var hs-var">programId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706881"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; dump'&quot;</span></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#parsePackages"><span class="hs-identifier hs-type">parsePackages</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-264"></span><span id="parsePackages"><span class="annot"><span class="annottext">parsePackages :: ByteString -&gt; Either [InstalledPackageInfo] [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#parsePackages"><span class="hs-identifier hs-var hs-var">parsePackages</span></a></span></span><span> </span><span id="local-6989586621679706874"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706874"><span class="hs-identifier hs-var">lbs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-265"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(ByteString
 -&gt; Either (NonEmpty [Char]) ([[Char]], InstalledPackageInfo))
-&gt; [ByteString]
-&gt; Either (NonEmpty [Char]) [([[Char]], InstalledPackageInfo)]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
-&gt; Either (NonEmpty [Char]) ([[Char]], InstalledPackageInfo)
</span><a href="Distribution.InstalledPackageInfo.html#parseInstalledPackageInfo"><span class="hs-identifier hs-var">parseInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">([ByteString]
 -&gt; Either (NonEmpty [Char]) [([[Char]], InstalledPackageInfo)])
-&gt; [ByteString]
-&gt; Either (NonEmpty [Char]) [([[Char]], InstalledPackageInfo)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString]
</span><a href="#local-6989586621679706871"><span class="hs-identifier hs-var">splitPkgs</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706874"><span class="hs-identifier hs-var">lbs0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-266"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679706870"><span class="annot"><span class="annottext">[([[Char]], InstalledPackageInfo)]
</span><a href="#local-6989586621679706870"><span class="hs-identifier hs-var">ok</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; Either [InstalledPackageInfo] [[Char]]
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Program.HcPkg.html#setUnitId"><span class="hs-identifier hs-var">setUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; InstalledPackageInfo)
-&gt; (InstalledPackageInfo -&gt; InstalledPackageInfo)
-&gt; InstalledPackageInfo
-&gt; InstalledPackageInfo
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; InstalledPackageInfo)
-&gt; ([Char] -&gt; InstalledPackageInfo -&gt; InstalledPackageInfo)
-&gt; Maybe [Char]
-&gt; InstalledPackageInfo
-&gt; InstalledPackageInfo
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; InstalledPackageInfo
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; InstalledPackageInfo -&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Program.HcPkg.html#mungePackagePaths"><span class="hs-identifier hs-var">mungePackagePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; Maybe [Char]
</span><a href="Distribution.Types.InstalledPackageInfo.html#pkgRoot"><span class="hs-identifier hs-var hs-var">pkgRoot</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706863"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; InstalledPackageInfo)
-&gt; InstalledPackageInfo -&gt; InstalledPackageInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706863"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[Char]]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679706863"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706863"><span class="hs-identifier hs-var">pkg</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[([[Char]], InstalledPackageInfo)]
</span><a href="#local-6989586621679706870"><span class="hs-identifier hs-var">ok</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-267"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679706862"><span class="annot"><span class="annottext">NonEmpty [Char]
</span><a href="#local-6989586621679706862"><span class="hs-identifier hs-var">msgs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; Either [InstalledPackageInfo] [[Char]]
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NonEmpty [Char] -&gt; [[Char]]
forall a. NonEmpty a -&gt; [a]
</span><a href="../../base/src/Data.List.NonEmpty.html#toList"><span class="hs-identifier hs-var">NE.toList</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty [Char]
</span><a href="#local-6989586621679706862"><span class="hs-identifier hs-var">msgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-269"></span><span>    </span><span class="annot"><a href="#local-6989586621679706871"><span class="hs-identifier hs-type">splitPkgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">BS.ByteString</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-270"></span><span>    </span><span id="local-6989586621679706871"><span class="annot"><span class="annottext">splitPkgs :: ByteString -&gt; [ByteString]
</span><a href="#local-6989586621679706871"><span class="hs-identifier hs-var hs-var">splitPkgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ByteString] -&gt; [ByteString]
</span><a href="#local-6989586621679706860"><span class="hs-identifier hs-var">checkEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">([ByteString] -&gt; [ByteString])
-&gt; (ByteString -&gt; [ByteString]) -&gt; ByteString -&gt; [ByteString]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString]
</span><a href="#local-6989586621679706859"><span class="hs-identifier hs-var">doSplit</span></a></span><span>
</span><span id="line-271"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-272"></span><span>        </span><span class="hs-comment">-- Handle the case of there being no packages at all.</span><span>
</span><span id="line-273"></span><span>        </span><span id="local-6989586621679706860"><span class="annot"><span class="annottext">checkEmpty :: [ByteString] -&gt; [ByteString]
</span><a href="#local-6989586621679706860"><span class="hs-identifier hs-var hs-var">checkEmpty</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679706858"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706858"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; Bool) -&gt; ByteString -&gt; Bool
</span><a href="../../bytestring/src/Data.ByteString.html#all"><span class="hs-identifier hs-var">BS.all</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Bool
</span><a href="#local-6989586621679706856"><span class="hs-identifier hs-var">isSpace8</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706858"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-274"></span><span>        </span><span class="annot"><a href="#local-6989586621679706860"><span class="hs-identifier hs-var">checkEmpty</span></a></span><span> </span><span id="local-6989586621679706855"><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679706855"><span class="hs-identifier hs-var">ss</span></a></span></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679706855"><span class="hs-identifier hs-var">ss</span></a></span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span>        </span><span class="annot"><a href="#local-6989586621679706856"><span class="hs-identifier hs-type">isSpace8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-277"></span><span>        </span><span id="local-6989586621679706856"><span class="annot"><span class="annottext">isSpace8 :: Word8 -&gt; Bool
</span><a href="#local-6989586621679706856"><span class="hs-identifier hs-var hs-var">isSpace8</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">9</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-comment">-- '\t'</span><span>
</span><span id="line-278"></span><span>        </span><span class="annot"><a href="#local-6989586621679706856"><span class="hs-identifier hs-var">isSpace8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">10</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-comment">-- '\n'</span><span>
</span><span id="line-279"></span><span>        </span><span class="annot"><a href="#local-6989586621679706856"><span class="hs-identifier hs-var">isSpace8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">13</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-comment">-- '\r'</span><span>
</span><span id="line-280"></span><span>        </span><span class="annot"><a href="#local-6989586621679706856"><span class="hs-identifier hs-var">isSpace8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">32</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-comment">-- ' '</span><span>
</span><span id="line-281"></span><span>        </span><span class="annot"><a href="#local-6989586621679706856"><span class="hs-identifier hs-var">isSpace8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span>        </span><span class="annot"><a href="#local-6989586621679706859"><span class="hs-identifier hs-type">doSplit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">BS.ByteString</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-284"></span><span>        </span><span id="local-6989586621679706859"><span class="annot"><span class="annottext">doSplit :: ByteString -&gt; [ByteString]
</span><a href="#local-6989586621679706859"><span class="hs-identifier hs-var hs-var">doSplit</span></a></span></span><span> </span><span id="local-6989586621679706854"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706854"><span class="hs-identifier hs-var">lbs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Int64] -&gt; [ByteString]
</span><a href="#local-6989586621679706853"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Word8 -&gt; Bool) -&gt; ByteString -&gt; [Int64]
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#findIndices"><span class="hs-identifier hs-var">LBS.findIndices</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679706851"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679706851"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679706851"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679706851"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">13</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706854"><span class="hs-identifier hs-var">lbs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-285"></span><span>          </span><span class="hs-keyword">where</span><span>
</span><span id="line-286"></span><span>            </span><span class="annot"><a href="#local-6989586621679706853"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">BS.ByteString</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-287"></span><span>            </span><span id="local-6989586621679706853"><span class="annot"><span class="annottext">go :: [Int64] -&gt; [ByteString]
</span><a href="#local-6989586621679706853"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#toStrict"><span class="hs-identifier hs-var">LBS.toStrict</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706854"><span class="hs-identifier hs-var">lbs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-288"></span><span>            </span><span class="annot"><a href="#local-6989586621679706853"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679706849"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679706849"><span class="hs-identifier hs-var">idx</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679706848"><span class="annot"><span class="annottext">[Int64]
</span><a href="#local-6989586621679706848"><span class="hs-identifier hs-var">idxs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-289"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679706847"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706847"><span class="hs-identifier hs-var">pfx</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679706846"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706846"><span class="hs-identifier hs-var">sfx</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; ByteString -&gt; (ByteString, ByteString)
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#splitAt"><span class="hs-identifier hs-var">LBS.splitAt</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679706849"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706854"><span class="hs-identifier hs-var">lbs</span></a></span><span>
</span><span id="line-290"></span><span>                </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Maybe ByteString -&gt; Maybe ByteString -&gt; Maybe ByteString)
-&gt; Maybe ByteString -&gt; [Maybe ByteString] -&gt; Maybe ByteString
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ByteString -&gt; Maybe ByteString -&gt; Maybe ByteString
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">(&lt;|&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ByteString
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe ByteString] -&gt; Maybe ByteString)
-&gt; [Maybe ByteString] -&gt; Maybe ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; Maybe ByteString)
-&gt; [ByteString] -&gt; [Maybe ByteString]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Maybe ByteString
</span><a href="Distribution.Simple.Program.HcPkg.html#lbsStripPrefix"><span class="hs-operator hs-var">`lbsStripPrefix`</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706846"><span class="hs-identifier hs-var">sfx</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ByteString]
</span><a href="#local-6989586621679706841"><span class="hs-identifier hs-var">separators</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-291"></span><span>                    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679706840"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706840"><span class="hs-identifier hs-var">sfx'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#toStrict"><span class="hs-identifier hs-var">LBS.toStrict</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706847"><span class="hs-identifier hs-var">pfx</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString] -&gt; [ByteString]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; [ByteString]
</span><a href="#local-6989586621679706859"><span class="hs-identifier hs-var">doSplit</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706840"><span class="hs-identifier hs-var">sfx'</span></a></span><span>
</span><span id="line-292"></span><span>                    </span><span class="annot"><span class="annottext">Maybe ByteString
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Int64] -&gt; [ByteString]
</span><a href="#local-6989586621679706853"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[Int64]
</span><a href="#local-6989586621679706848"><span class="hs-identifier hs-var">idxs</span></a></span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span>            </span><span class="annot"><a href="#local-6989586621679706841"><span class="hs-identifier hs-type">separators</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-295"></span><span>            </span><span id="local-6989586621679706841"><span class="annot"><span class="annottext">separators :: [ByteString]
</span><a href="#local-6989586621679706841"><span class="hs-identifier hs-var hs-var">separators</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-string">&quot;\n---\n&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-string">&quot;\r\n---\r\n&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-string">&quot;\r---\r&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#lbsStripPrefix"><span class="hs-identifier hs-type">lbsStripPrefix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">LBS.ByteString</span></a></span><span class="hs-cpp">
#if MIN_VERSION_bytestring(0,10,8)
</span><span id="lbsStripPrefix"><span class="annot"><span class="annottext">lbsStripPrefix :: ByteString -&gt; ByteString -&gt; Maybe ByteString
</span><a href="Distribution.Simple.Program.HcPkg.html#lbsStripPrefix"><span class="hs-identifier hs-var hs-var">lbsStripPrefix</span></a></span></span><span> </span><span id="local-6989586621679706839"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706839"><span class="hs-identifier hs-var">pfx</span></a></span></span><span> </span><span id="local-6989586621679706838"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706838"><span class="hs-identifier hs-var">lbs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; Maybe ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#stripPrefix"><span class="hs-identifier hs-var">LBS.stripPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706839"><span class="hs-identifier hs-var">pfx</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679706838"><span class="hs-identifier hs-var">lbs</span></a></span><span class="hs-cpp">
#else
</span><span class="hs-identifier">lbsStripPrefix</span><span> </span><span class="hs-identifier">pfx</span><span> </span><span class="hs-identifier">lbs</span><span>
</span><span id="line-302"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">LBS.isPrefixOf</span><span> </span><span class="hs-identifier">pfx</span><span> </span><span class="hs-identifier">lbs</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Just</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">LBS.drop</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">LBS.length</span><span> </span><span class="hs-identifier">pfx</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">lbs</span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">otherwise</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Nothing</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#mungePackagePaths"><span class="hs-identifier hs-type">mungePackagePaths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-308"></span><span class="hs-comment">-- Perform path/URL variable substitution as per the Cabal ${pkgroot} spec</span><span>
</span><span id="line-309"></span><span class="hs-comment">-- (http://www.haskell.org/pipermail/libraries/2009-May/011772.html)</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- Paths/URLs can be relative to ${pkgroot} or ${pkgrooturl}.</span><span>
</span><span id="line-311"></span><span class="hs-comment">-- The &quot;pkgroot&quot; is the directory containing the package database.</span><span>
</span><span id="line-312"></span><span id="mungePackagePaths"><span class="annot"><span class="annottext">mungePackagePaths :: [Char] -&gt; InstalledPackageInfo -&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Program.HcPkg.html#mungePackagePaths"><span class="hs-identifier hs-var hs-var">mungePackagePaths</span></a></span></span><span> </span><span id="local-6989586621679706836"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706836"><span class="hs-identifier hs-var">pkgroot</span></a></span></span><span> </span><span id="local-6989586621679706835"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-313"></span><span>    </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-314"></span><span>      </span><span class="annot"><span class="annottext">importDirs :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#importDirs"><span class="hs-identifier hs-var">importDirs</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var">mungePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#importDirs"><span class="hs-identifier hs-var hs-var">importDirs</span></a></span><span>  </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-315"></span><span>      </span><span class="annot"><span class="annottext">includeDirs :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#includeDirs"><span class="hs-identifier hs-var">includeDirs</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var">mungePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#includeDirs"><span class="hs-identifier hs-var hs-var">includeDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-316"></span><span>      </span><span class="annot"><span class="annottext">libraryDirs :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDirs"><span class="hs-identifier hs-var">libraryDirs</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var">mungePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDirs"><span class="hs-identifier hs-var hs-var">libraryDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-317"></span><span>      </span><span class="annot"><span class="annottext">libraryDynDirs :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDynDirs"><span class="hs-identifier hs-var">libraryDynDirs</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var">mungePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDynDirs"><span class="hs-identifier hs-var hs-var">libraryDynDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-318"></span><span>      </span><span class="annot"><span class="annottext">frameworkDirs :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#frameworkDirs"><span class="hs-identifier hs-var">frameworkDirs</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var">mungePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#frameworkDirs"><span class="hs-identifier hs-var hs-var">frameworkDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-319"></span><span>      </span><span class="annot"><span class="annottext">haddockInterfaces :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#haddockInterfaces"><span class="hs-identifier hs-var">haddockInterfaces</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var">mungePaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#haddockInterfaces"><span class="hs-identifier hs-var hs-var">haddockInterfaces</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-320"></span><span>      </span><span class="annot"><span class="annottext">haddockHTMLs :: [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#haddockHTMLs"><span class="hs-identifier hs-var">haddockHTMLs</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706826"><span class="hs-identifier hs-var">mungeUrls</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [[Char]]
</span><a href="Distribution.Types.InstalledPackageInfo.html#haddockHTMLs"><span class="hs-identifier hs-var hs-var">haddockHTMLs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706835"><span class="hs-identifier hs-var">pkginfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-321"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-322"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-323"></span><span>    </span><span id="local-6989586621679706833"><span class="annot"><span class="annottext">mungePaths :: [[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706833"><span class="hs-identifier hs-var hs-var">mungePaths</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; [Char]) -&gt; [[Char]] -&gt; [[Char]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char]
</span><a href="#local-6989586621679706825"><span class="hs-identifier hs-var">mungePath</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span id="local-6989586621679706826"><span class="annot"><span class="annottext">mungeUrls :: [[Char]] -&gt; [[Char]]
</span><a href="#local-6989586621679706826"><span class="hs-identifier hs-var hs-var">mungeUrls</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; [Char]) -&gt; [[Char]] -&gt; [[Char]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char]
</span><a href="#local-6989586621679706824"><span class="hs-identifier hs-var">mungeUrl</span></a></span><span>
</span><span id="line-325"></span><span>
</span><span id="line-326"></span><span>    </span><span id="local-6989586621679706825"><span class="annot"><span class="annottext">mungePath :: [Char] -&gt; [Char]
</span><a href="#local-6989586621679706825"><span class="hs-identifier hs-var hs-var">mungePath</span></a></span></span><span> </span><span id="local-6989586621679706823"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706823"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; Maybe [Char]
</span><a href="#local-6989586621679706822"><span class="hs-identifier hs-var">stripVarPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;${pkgroot}&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706823"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-327"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679706821"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706821"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706836"><span class="hs-identifier hs-var">pkgroot</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706821"><span class="hs-identifier hs-var">p'</span></a></span><span>
</span><span id="line-328"></span><span>      </span><span class="annot"><span class="annottext">Maybe [Char]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706823"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span>    </span><span id="local-6989586621679706824"><span class="annot"><span class="annottext">mungeUrl :: [Char] -&gt; [Char]
</span><a href="#local-6989586621679706824"><span class="hs-identifier hs-var hs-var">mungeUrl</span></a></span></span><span> </span><span id="local-6989586621679706820"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706820"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; Maybe [Char]
</span><a href="#local-6989586621679706822"><span class="hs-identifier hs-var">stripVarPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;${pkgrooturl}&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706820"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-331"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679706819"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706819"><span class="hs-identifier hs-var">p'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
</span><a href="#local-6989586621679706818"><span class="hs-identifier hs-var">toUrlPath</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706836"><span class="hs-identifier hs-var">pkgroot</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706819"><span class="hs-identifier hs-var">p'</span></a></span><span>
</span><span id="line-332"></span><span>      </span><span class="annot"><span class="annottext">Maybe [Char]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706820"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span>    </span><span id="local-6989586621679706818"><span class="annot"><span class="annottext">toUrlPath :: [Char] -&gt; [Char] -&gt; [Char]
</span><a href="#local-6989586621679706818"><span class="hs-identifier hs-var hs-var">toUrlPath</span></a></span></span><span> </span><span id="local-6989586621679706815"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706815"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679706814"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706814"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;file:///&quot;</span></span><span>
</span><span id="line-335"></span><span>                 </span><span class="hs-comment">-- URLs always use posix style '/' separators:</span><span>
</span><span id="line-336"></span><span>                 </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]] -&gt; [Char]
</span><a href="../../filepath/src/System.FilePath.Posix.html#joinPath"><span class="hs-identifier hs-var">FilePath.Posix.joinPath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706815"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]] -&gt; [[Char]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]]
</span><a href="../../filepath/src/System.FilePath.Windows.html#splitDirectories"><span class="hs-identifier hs-var">FilePath.splitDirectories</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706814"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span>    </span><span id="local-6989586621679706822"><span class="annot"><span class="annottext">stripVarPrefix :: [Char] -&gt; [Char] -&gt; Maybe [Char]
</span><a href="#local-6989586621679706822"><span class="hs-identifier hs-var hs-var">stripVarPrefix</span></a></span></span><span> </span><span id="local-6989586621679706811"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706811"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span id="local-6989586621679706810"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706810"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-339"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]]
</span><a href="../../filepath/src/System.FilePath.Windows.html#splitPath"><span class="hs-identifier hs-var">splitPath</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706810"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-340"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679706809"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706809"><span class="hs-identifier hs-var">root</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679706808"><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706808"><span class="hs-identifier hs-var">path'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; Maybe [Char]
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Maybe [a]
</span><a href="../../base/src/Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706811"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706809"><span class="hs-identifier hs-var">root</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-341"></span><span>          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679706807"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679706807"><span class="hs-identifier hs-var">sep</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../filepath/src/System.FilePath.Windows.html#isPathSeparator"><span class="hs-identifier hs-var">isPathSeparator</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679706807"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Maybe [Char]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[Char]] -&gt; [Char]
</span><a href="../../filepath/src/System.FilePath.Windows.html#joinPath"><span class="hs-identifier hs-var">joinPath</span></a></span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706808"><span class="hs-identifier hs-var">path'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-342"></span><span>          </span><span class="annot"><span class="annottext">Maybe [Char]
</span><span class="hs-identifier">_</span></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe [Char]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-343"></span><span>        </span><span class="annot"><span class="annottext">[[Char]]
</span><span class="hs-identifier">_</span></span><span>                                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe [Char]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span>
</span><span id="line-346"></span><span class="hs-comment">-- Older installed package info files did not have the installedUnitId</span><span>
</span><span id="line-347"></span><span class="hs-comment">-- field, so if it is missing then we fill it as the source package ID.</span><span>
</span><span id="line-348"></span><span class="hs-comment">-- NB: Internal libraries not supported.</span><span>
</span><span id="line-349"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#setUnitId"><span class="hs-identifier hs-type">setUnitId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-350"></span><span id="setUnitId"><span class="annot"><span class="annottext">setUnitId :: InstalledPackageInfo -&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.Program.HcPkg.html#setUnitId"><span class="hs-identifier hs-var hs-var">setUnitId</span></a></span></span><span> </span><span id="local-6989586621679706806"><span class="annot"><span class="annottext">pkginfo :: InstalledPackageInfo
</span><a href="#local-6989586621679706806"><span class="hs-identifier hs-var">pkginfo</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-351"></span><span>                        </span><span class="annot"><span class="annottext">installedUnitId :: InstalledPackageInfo -&gt; UnitId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedUnitId"><span class="hs-identifier hs-var">installedUnitId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679706804"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679706804"><span class="hs-identifier hs-var">uid</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-352"></span><span>                        </span><span class="annot"><span class="annottext">sourcePackageId :: InstalledPackageInfo -&gt; PackageId
</span><a href="Distribution.Types.InstalledPackageInfo.html#sourcePackageId"><span class="hs-identifier hs-var">sourcePackageId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679706802"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706802"><span class="hs-identifier hs-var">pid</span></a></span></span><span>
</span><span id="line-353"></span><span>                      </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; [Char]
</span><a href="Distribution.Types.UnitId.html#unUnitId"><span class="hs-identifier hs-var">unUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679706804"><span class="hs-identifier hs-var">uid</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-354"></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706806"><span class="hs-identifier hs-var">pkginfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-355"></span><span>                        </span><span class="annot"><span class="annottext">installedUnitId :: UnitId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedUnitId"><span class="hs-identifier hs-var">installedUnitId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; UnitId
</span><a href="Distribution.Types.UnitId.html#mkLegacyUnitId"><span class="hs-identifier hs-var">mkLegacyUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706802"><span class="hs-identifier hs-var">pid</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-356"></span><span>                        </span><span class="annot"><span class="annottext">installedComponentId_ :: ComponentId
</span><a href="Distribution.Types.InstalledPackageInfo.html#installedComponentId_"><span class="hs-identifier hs-var">installedComponentId_</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; ComponentId
</span><a href="Distribution.Types.ComponentId.html#mkComponentId"><span class="hs-identifier hs-var">mkComponentId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706802"><span class="hs-identifier hs-var">pid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-357"></span><span>                      </span><span class="hs-special">}</span><span>
</span><span id="line-358"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#setUnitId"><span class="hs-identifier hs-var">setUnitId</span></a></span><span> </span><span id="local-6989586621679706797"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706797"><span class="hs-identifier hs-var">pkginfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706797"><span class="hs-identifier hs-var">pkginfo</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span>
</span><span id="line-361"></span><span class="hs-comment">-- | Call @hc-pkg@ to get the source package Id of all the packages in the</span><span>
</span><span id="line-362"></span><span class="hs-comment">-- given package database.</span><span>
</span><span id="line-363"></span><span class="hs-comment">--</span><span>
</span><span id="line-364"></span><span class="hs-comment">-- This is much less information than with 'dump', but also rather quicker.</span><span>
</span><span id="line-365"></span><span class="hs-comment">-- Note in particular that it does not include the 'UnitId', just</span><span>
</span><span id="line-366"></span><span class="hs-comment">-- the source 'PackageId' which is not necessarily unique in any package db.</span><span>
</span><span id="line-367"></span><span class="hs-comment">--</span><span>
</span><span id="line-368"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#list"><span class="hs-identifier hs-type">list</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-369"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-370"></span><span id="list"><span class="annot"><span class="annottext">list :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; IO [PackageId]
</span><a href="Distribution.Simple.Program.HcPkg.html#list"><span class="hs-identifier hs-var hs-var">list</span></a></span></span><span> </span><span id="local-6989586621679706796"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706796"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706795"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706795"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706794"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706794"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span>  </span><span id="local-6989586621679706793"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706793"><span class="hs-identifier hs-var">output</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO [Char]
</span><a href="Distribution.Simple.Program.Run.html#getProgramInvocationOutput"><span class="hs-identifier hs-var">getProgramInvocationOutput</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706795"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-373"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#listInvocation"><span class="hs-identifier hs-var">listInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706796"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706795"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706794"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-374"></span><span>    </span><span class="annot"><span class="annottext">IO [Char] -&gt; (IOException -&gt; IO [Char]) -&gt; IO [Char]
forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="Distribution.Compat.Exception.html#catchIO"><span class="hs-operator hs-var">`catchIO`</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">IOException
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO [Char]
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706795"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO [Char]) -&gt; [Char] -&gt; IO [Char]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [Char]
</span><a href="Distribution.Simple.Program.Types.html#programId"><span class="hs-identifier hs-var hs-var">programId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706796"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; list failed&quot;</span></span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Maybe [PackageId]
</span><a href="#local-6989586621679706791"><span class="hs-identifier hs-var">parsePackageIds</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706793"><span class="hs-identifier hs-var">output</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-377"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679706790"><span class="annot"><span class="annottext">[PackageId]
</span><a href="#local-6989586621679706790"><span class="hs-identifier hs-var">ok</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[PackageId] -&gt; IO [PackageId]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageId]
</span><a href="#local-6989586621679706790"><span class="hs-identifier hs-var">ok</span></a></span><span>
</span><span id="line-378"></span><span>    </span><span class="annot"><span class="annottext">Maybe [PackageId]
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [Char] -&gt; IO [PackageId]
forall a. Verbosity -&gt; [Char] -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706795"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IO [PackageId]) -&gt; [Char] -&gt; IO [PackageId]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;failed to parse output of '&quot;</span></span><span>
</span><span id="line-379"></span><span>                  </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [Char]
</span><a href="Distribution.Simple.Program.Types.html#programId"><span class="hs-identifier hs-var hs-var">programId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706796"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; list'&quot;</span></span><span>
</span><span id="line-380"></span><span>
</span><span id="line-381"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-382"></span><span>    </span><span id="local-6989586621679706791"><span class="annot"><span class="annottext">parsePackageIds :: [Char] -&gt; Maybe [PackageId]
</span><a href="#local-6989586621679706791"><span class="hs-identifier hs-var hs-var">parsePackageIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; Maybe PackageId) -&gt; [[Char]] -&gt; Maybe [PackageId]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Maybe PackageId
forall a. Parsec a =&gt; [Char] -&gt; Maybe a
</span><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier hs-var">simpleParsec</span></a></span><span> </span><span class="annot"><span class="annottext">([[Char]] -&gt; Maybe [PackageId])
-&gt; ([Char] -&gt; [[Char]]) -&gt; [Char] -&gt; Maybe [PackageId]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-385"></span><span class="hs-comment">-- The program invocations</span><span>
</span><span id="line-386"></span><span class="hs-comment">--</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#initInvocation"><span class="hs-identifier hs-type">initInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-389"></span><span id="initInvocation"><span class="annot"><span class="annottext">initInvocation :: HcPkgInfo -&gt; Verbosity -&gt; [Char] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#initInvocation"><span class="hs-identifier hs-var hs-var">initInvocation</span></a></span></span><span> </span><span id="local-6989586621679706782"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706782"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706781"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706781"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706780"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706780"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-390"></span><span>    </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706782"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706779"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-391"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-392"></span><span>    </span><span id="local-6989586621679706779"><span class="annot"><span class="annottext">args :: [[Char]]
</span><a href="#local-6989586621679706779"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;init&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706780"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-393"></span><span>        </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706782"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706781"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#registerInvocation"><span class="hs-identifier hs-type">registerInvocation</span></a></span><span>
</span><span id="line-396"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-397"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-398"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-type">RegisterOptions</span></a></span><span>
</span><span id="line-399"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-400"></span><span id="registerInvocation"><span class="annot"><span class="annottext">registerInvocation :: HcPkgInfo
-&gt; Verbosity
-&gt; PackageDBStack
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#registerInvocation"><span class="hs-identifier hs-var hs-var">registerInvocation</span></a></span></span><span> </span><span id="local-6989586621679706775"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706775"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706774"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706774"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706773"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706773"><span class="hs-identifier hs-var">packagedbs</span></a></span></span><span> </span><span id="local-6989586621679706772"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706772"><span class="hs-identifier hs-var">pkgInfo</span></a></span></span><span> </span><span id="local-6989586621679706771"><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706771"><span class="hs-identifier hs-var">registerOptions</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-401"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706775"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]]
</span><a href="#local-6989586621679706770"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-402"></span><span>      </span><span class="annot"><span class="annottext">progInvokeInput :: Maybe IOData
</span><a href="Distribution.Simple.Program.Run.html#progInvokeInput"><span class="hs-identifier hs-var">progInvokeInput</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOData -&gt; Maybe IOData
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(IOData -&gt; Maybe IOData) -&gt; IOData -&gt; Maybe IOData
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; IOData
</span><a href="Distribution.Utils.IOData.html#IODataText"><span class="hs-identifier hs-var">IODataText</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; IOData) -&gt; [Char] -&gt; IOData
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [Char]
</span><a href="Distribution.InstalledPackageInfo.html#showInstalledPackageInfo"><span class="hs-identifier hs-var">showInstalledPackageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679706772"><span class="hs-identifier hs-var">pkgInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-403"></span><span>      </span><span class="annot"><span class="annottext">progInvokeInputEncoding :: IOEncoding
</span><a href="Distribution.Simple.Program.Run.html#progInvokeInputEncoding"><span class="hs-identifier hs-var">progInvokeInputEncoding</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOEncoding
</span><a href="Distribution.Simple.Program.Run.html#IOEncodingUTF8"><span class="hs-identifier hs-var">IOEncodingUTF8</span></a></span><span>
</span><span id="line-404"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-405"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-406"></span><span>    </span><span id="local-6989586621679706762"><span class="annot"><span class="annottext">cmdname :: [Char]
</span><a href="#local-6989586621679706762"><span class="hs-identifier hs-var hs-var">cmdname</span></a></span></span><span>
</span><span id="line-407"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerAllowOverwrite"><span class="hs-identifier hs-var hs-var">registerAllowOverwrite</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706771"><span class="hs-identifier hs-var">registerOptions</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;update&quot;</span></span><span>
</span><span id="line-408"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var hs-var">registerMultiInstance</span></a></span><span>  </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706771"><span class="hs-identifier hs-var">registerOptions</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;update&quot;</span></span><span>
</span><span id="line-409"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;register&quot;</span></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span>    </span><span id="local-6989586621679706770"><span class="annot"><span class="annottext">args :: [Char] -&gt; [[Char]]
</span><a href="#local-6989586621679706770"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span id="local-6989586621679706758"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706758"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706762"><span class="hs-identifier hs-var">cmdname</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706758"><span class="hs-identifier hs-var">file</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-412"></span><span>             </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDBStack -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbStackOpts"><span class="hs-identifier hs-var">packageDbStackOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706775"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706773"><span class="hs-identifier hs-var">packagedbs</span></a></span><span>
</span><span id="line-413"></span><span>             </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--enable-multi-instance&quot;</span></span><span>
</span><span id="line-414"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerMultiInstance"><span class="hs-identifier hs-var hs-var">registerMultiInstance</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706771"><span class="hs-identifier hs-var">registerOptions</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-415"></span><span>             </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--force-files&quot;</span></span><span>
</span><span id="line-416"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegisterOptions -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#registerSuppressFilesCheck"><span class="hs-identifier hs-var hs-var">registerSuppressFilesCheck</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679706771"><span class="hs-identifier hs-var">registerOptions</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-417"></span><span>             </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706775"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706774"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#unregisterInvocation"><span class="hs-identifier hs-type">unregisterInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-420"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-421"></span><span id="unregisterInvocation"><span class="annot"><span class="annottext">unregisterInvocation :: HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#unregisterInvocation"><span class="hs-identifier hs-var hs-var">unregisterInvocation</span></a></span></span><span> </span><span id="local-6989586621679706757"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706757"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706756"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706756"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706755"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706755"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706754"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706754"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-422"></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706757"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[Char]] -&gt; ProgramInvocation) -&gt; [[Char]] -&gt; ProgramInvocation
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-423"></span><span>       </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;unregister&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706757"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706755"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706754"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-424"></span><span>    </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706757"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706756"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-425"></span><span>
</span><span id="line-426"></span><span>
</span><span id="line-427"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#recacheInvocation"><span class="hs-identifier hs-type">recacheInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-428"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-429"></span><span id="recacheInvocation"><span class="annot"><span class="annottext">recacheInvocation :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#recacheInvocation"><span class="hs-identifier hs-var hs-var">recacheInvocation</span></a></span></span><span> </span><span id="local-6989586621679706752"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706752"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706751"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706751"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706750"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706750"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-430"></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706752"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[Char]] -&gt; ProgramInvocation) -&gt; [[Char]] -&gt; ProgramInvocation
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-431"></span><span>       </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;recache&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706752"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706750"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-432"></span><span>    </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706752"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706751"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span>
</span><span id="line-435"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#exposeInvocation"><span class="hs-identifier hs-type">exposeInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-436"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-437"></span><span id="exposeInvocation"><span class="annot"><span class="annottext">exposeInvocation :: HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#exposeInvocation"><span class="hs-identifier hs-var hs-var">exposeInvocation</span></a></span></span><span> </span><span id="local-6989586621679706749"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706749"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706748"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706748"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706747"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706747"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706746"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706746"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-438"></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706749"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[Char]] -&gt; ProgramInvocation) -&gt; [[Char]] -&gt; ProgramInvocation
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-439"></span><span>       </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;expose&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706749"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706747"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706746"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-440"></span><span>    </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706749"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706748"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#describeInvocation"><span class="hs-identifier hs-type">describeInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-443"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-444"></span><span id="describeInvocation"><span class="annot"><span class="annottext">describeInvocation :: HcPkgInfo
-&gt; Verbosity -&gt; PackageDBStack -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#describeInvocation"><span class="hs-identifier hs-var hs-var">describeInvocation</span></a></span></span><span> </span><span id="local-6989586621679706745"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706745"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706744"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706744"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706743"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706743"><span class="hs-identifier hs-var">packagedbs</span></a></span></span><span> </span><span id="local-6989586621679706742"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706742"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-445"></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706745"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[Char]] -&gt; ProgramInvocation) -&gt; [[Char]] -&gt; ProgramInvocation
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-446"></span><span>       </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;describe&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706742"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-447"></span><span>    </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDBStack -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbStackOpts"><span class="hs-identifier hs-var">packageDbStackOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706745"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706743"><span class="hs-identifier hs-var">packagedbs</span></a></span><span>
</span><span id="line-448"></span><span>    </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706745"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706744"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-449"></span><span>
</span><span id="line-450"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#hideInvocation"><span class="hs-identifier hs-type">hideInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-451"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-452"></span><span id="hideInvocation"><span class="annot"><span class="annottext">hideInvocation :: HcPkgInfo
-&gt; Verbosity -&gt; PackageDB -&gt; PackageId -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#hideInvocation"><span class="hs-identifier hs-var hs-var">hideInvocation</span></a></span></span><span> </span><span id="local-6989586621679706741"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706741"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706740"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706740"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679706739"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706739"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679706738"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706738"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-453"></span><span>  </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706741"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[Char]] -&gt; ProgramInvocation) -&gt; [[Char]] -&gt; ProgramInvocation
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-454"></span><span>       </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;hide&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706741"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706739"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; [Char]
forall a. Pretty a =&gt; a -&gt; [Char]
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679706738"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-455"></span><span>    </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706741"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706740"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#dumpInvocation"><span class="hs-identifier hs-type">dumpInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-459"></span><span id="dumpInvocation"><span class="annot"><span class="annottext">dumpInvocation :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#dumpInvocation"><span class="hs-identifier hs-var hs-var">dumpInvocation</span></a></span></span><span> </span><span id="local-6989586621679706737"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706737"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706736"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706736"><span class="hs-identifier hs-var">_verbosity</span></a></span></span><span> </span><span id="local-6989586621679706735"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706735"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-460"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706737"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706734"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-461"></span><span>      </span><span class="annot"><span class="annottext">progInvokeOutputEncoding :: IOEncoding
</span><a href="Distribution.Simple.Program.Run.html#progInvokeOutputEncoding"><span class="hs-identifier hs-var">progInvokeOutputEncoding</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOEncoding
</span><a href="Distribution.Simple.Program.Run.html#IOEncodingUTF8"><span class="hs-identifier hs-var">IOEncodingUTF8</span></a></span><span>
</span><span id="line-462"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-463"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-464"></span><span>    </span><span id="local-6989586621679706734"><span class="annot"><span class="annottext">args :: [[Char]]
</span><a href="#local-6989586621679706734"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;dump&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706737"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706735"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-465"></span><span>        </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706737"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#silent"><span class="hs-identifier hs-var">silent</span></a></span><span>
</span><span id="line-466"></span><span>           </span><span class="hs-comment">-- We use verbosity level 'silent' because it is important that we</span><span>
</span><span id="line-467"></span><span>           </span><span class="hs-comment">-- do not contaminate the output with info/debug messages.</span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#listInvocation"><span class="hs-identifier hs-type">listInvocation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Run.html#ProgramInvocation"><span class="hs-identifier hs-type">ProgramInvocation</span></a></span><span>
</span><span id="line-470"></span><span id="listInvocation"><span class="annot"><span class="annottext">listInvocation :: HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.HcPkg.html#listInvocation"><span class="hs-identifier hs-var hs-var">listInvocation</span></a></span></span><span> </span><span id="local-6989586621679706729"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706729"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706728"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706728"><span class="hs-identifier hs-var">_verbosity</span></a></span></span><span> </span><span id="local-6989586621679706727"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706727"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-471"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [[Char]] -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.Run.html#programInvocation"><span class="hs-identifier hs-var">programInvocation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var hs-var">hcPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706729"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[Char]]
</span><a href="#local-6989586621679706726"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-472"></span><span>      </span><span class="annot"><span class="annottext">progInvokeOutputEncoding :: IOEncoding
</span><a href="Distribution.Simple.Program.Run.html#progInvokeOutputEncoding"><span class="hs-identifier hs-var">progInvokeOutputEncoding</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOEncoding
</span><a href="Distribution.Simple.Program.Run.html#IOEncodingUTF8"><span class="hs-identifier hs-var">IOEncodingUTF8</span></a></span><span>
</span><span id="line-473"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-474"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-475"></span><span>    </span><span id="local-6989586621679706726"><span class="annot"><span class="annottext">args :: [[Char]]
</span><a href="#local-6989586621679706726"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;list&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--simple-output&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706729"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679706727"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-476"></span><span>        </span><span class="annot"><span class="annottext">[[Char]] -&gt; [[Char]] -&gt; [[Char]]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var">verbosityOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706729"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#silent"><span class="hs-identifier hs-var">silent</span></a></span><span>
</span><span id="line-477"></span><span>           </span><span class="hs-comment">-- We use verbosity level 'silent' because it is important that we</span><span>
</span><span id="line-478"></span><span>           </span><span class="hs-comment">-- do not contaminate the output with info/debug messages.</span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#packageDbStackOpts"><span class="hs-identifier hs-type">packageDbStackOpts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-482"></span><span id="packageDbStackOpts"><span class="annot"><span class="annottext">packageDbStackOpts :: HcPkgInfo -&gt; PackageDBStack -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbStackOpts"><span class="hs-identifier hs-var hs-var">packageDbStackOpts</span></a></span></span><span> </span><span id="local-6989586621679706722"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706722"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706721"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706721"><span class="hs-identifier hs-var">dbstack</span></a></span></span><span>
</span><span id="line-483"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#noPkgDbStack"><span class="hs-identifier hs-var hs-var">noPkgDbStack</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706722"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706722"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDBStack -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-var">registrationPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706721"><span class="hs-identifier hs-var">dbstack</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-484"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706721"><span class="hs-identifier hs-var">dbstack</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-485"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679706718"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706718"><span class="hs-identifier hs-var">dbs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--global&quot;</span></span><span>
</span><span id="line-486"></span><span>                                         </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]] -&gt; [[Char]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--user&quot;</span></span><span>
</span><span id="line-487"></span><span>                                         </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]] -&gt; [[Char]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(PackageDB -&gt; [Char]) -&gt; PackageDBStack -&gt; [[Char]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; [Char]
</span><a href="#local-6989586621679706717"><span class="hs-identifier hs-var">specific</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706718"><span class="hs-identifier hs-var">dbs</span></a></span><span>
</span><span id="line-488"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679706716"><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706716"><span class="hs-identifier hs-var">dbs</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--global&quot;</span></span><span>
</span><span id="line-489"></span><span>                                         </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]] -&gt; [[Char]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--no-user-&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbFlag"><span class="hs-identifier hs-var">packageDbFlag</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706722"><span class="hs-identifier hs-var">hpi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-490"></span><span>                                         </span><span class="annot"><span class="annottext">[Char] -&gt; [[Char]] -&gt; [[Char]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(PackageDB -&gt; [Char]) -&gt; PackageDBStack -&gt; [[Char]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; [Char]
</span><a href="#local-6989586621679706717"><span class="hs-identifier hs-var">specific</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706716"><span class="hs-identifier hs-var">dbs</span></a></span><span>
</span><span id="line-491"></span><span>    </span><span class="annot"><span class="annottext">PackageDBStack
</span><span class="hs-identifier">_</span></span><span>                                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[[Char]]
forall a. a
</span><a href="#local-6989586621679706714"><span class="hs-identifier hs-var">ierror</span></a></span><span>
</span><span id="line-492"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-493"></span><span>      </span><span id="local-6989586621679706717"><span class="annot"><span class="annottext">specific :: PackageDB -&gt; [Char]
</span><a href="#local-6989586621679706717"><span class="hs-identifier hs-var hs-var">specific</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679706710"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706710"><span class="hs-identifier hs-var">db</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbFlag"><span class="hs-identifier hs-var">packageDbFlag</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706722"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;=&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706710"><span class="hs-identifier hs-var">db</span></a></span><span>
</span><span id="line-494"></span><span>      </span><span class="annot"><a href="#local-6989586621679706717"><span class="hs-identifier hs-var">specific</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
forall a. a
</span><a href="#local-6989586621679706714"><span class="hs-identifier hs-var">ierror</span></a></span><span>
</span><span id="line-495"></span><span>      </span><span id="local-6989586621679707078"><span class="annot"><a href="#local-6989586621679706714"><span class="hs-identifier hs-type">ierror</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679707078"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-496"></span><span>      </span><span id="local-6989586621679706714"><span class="annot"><span class="annottext">ierror :: forall a. a
</span><a href="#local-6989586621679706714"><span class="hs-identifier hs-var hs-var">ierror</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;internal error: unexpected package db stack: &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDBStack
</span><a href="#local-6989586621679706721"><span class="hs-identifier hs-var">dbstack</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#packageDbFlag"><span class="hs-identifier hs-type">packageDbFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-499"></span><span id="packageDbFlag"><span class="annot"><span class="annottext">packageDbFlag :: HcPkgInfo -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbFlag"><span class="hs-identifier hs-var hs-var">packageDbFlag</span></a></span></span><span> </span><span id="local-6989586621679706700"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706700"><span class="hs-identifier hs-var">hpi</span></a></span></span><span>
</span><span id="line-500"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#flagPackageConf"><span class="hs-identifier hs-var hs-var">flagPackageConf</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706700"><span class="hs-identifier hs-var">hpi</span></a></span><span>
</span><span id="line-501"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;package-conf&quot;</span></span><span>
</span><span id="line-502"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-503"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;package-db&quot;</span></span><span>
</span><span id="line-504"></span><span>
</span><span id="line-505"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-type">packageDbOpts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-506"></span><span id="packageDbOpts"><span class="annot"><span class="annottext">packageDbOpts :: HcPkgInfo -&gt; PackageDB -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var hs-var">packageDbOpts</span></a></span></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--global&quot;</span></span><span>
</span><span id="line-507"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--user&quot;</span></span><span>
</span><span id="line-508"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#packageDbOpts"><span class="hs-identifier hs-var">packageDbOpts</span></a></span><span> </span><span id="local-6989586621679706699"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706699"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679706698"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706698"><span class="hs-identifier hs-var">db</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;--&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; [Char]
</span><a href="Distribution.Simple.Program.HcPkg.html#packageDbFlag"><span class="hs-identifier hs-var">packageDbFlag</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706699"><span class="hs-identifier hs-var">hpi</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;=&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679706698"><span class="hs-identifier hs-var">db</span></a></span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-type">verbosityOpts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkgInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-511"></span><span id="verbosityOpts"><span class="annot"><span class="annottext">verbosityOpts :: HcPkgInfo -&gt; Verbosity -&gt; [[Char]]
</span><a href="Distribution.Simple.Program.HcPkg.html#verbosityOpts"><span class="hs-identifier hs-var hs-var">verbosityOpts</span></a></span></span><span> </span><span id="local-6989586621679706697"><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706697"><span class="hs-identifier hs-var">hpi</span></a></span></span><span> </span><span id="local-6989586621679706696"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706696"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-512"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#noVerboseFlag"><span class="hs-identifier hs-var hs-var">noVerboseFlag</span></a></span><span> </span><span class="annot"><span class="annottext">HcPkgInfo
</span><a href="#local-6989586621679706697"><span class="hs-identifier hs-var">hpi</span></a></span><span>
</span><span id="line-513"></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-514"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706696"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; Verbosity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#deafening"><span class="hs-identifier hs-var">deafening</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;-v2&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-515"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679706696"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; Verbosity -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#silent"><span class="hs-identifier hs-var">silent</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;-v0&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-516"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-517"></span></pre></body></html>